#include <stdio.h>

int main(int argc, char const *argv[])
{
    int n1, n2;

    printf("Enter two number: ");
    scanf("%d %d", &n1, &n2);

    while(n1 != n2)
    {
        if(n1 > n2)
        n1 = n1 - n2;
        else
        n2 = n2 - n1;
    }
    printf("НОД = %d\n", n1);
    return 0;
}
